home *** CD-ROM | disk | FTP | other *** search
Wrap
ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) NNNNAAAAMMMMEEEE _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff_:::: _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff_,,,, _wwww_pppp_rrrr_iiii_nnnn_tttt_ffff_,,,, _ssss_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff - print formatted wide-character output SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_iiii_oooo_...._hhhh_>>>> _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_wwww_cccc_hhhh_aaaa_rrrr_...._hhhh_>>>> _iiii_nnnn_tttt _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff_((((_FFFF_IIII_LLLL_EEEE _****_ssss_tttt_rrrr_eeee_aaaa_mmmm_,,,, _cccc_oooo_nnnn_ssss_tttt _wwww_cccc_hhhh_aaaa_rrrr______tttt _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _...._...._...._))))_;;;; _iiii_nnnn_tttt _wwww_pppp_rrrr_iiii_nnnn_tttt_ffff_((((_cccc_oooo_nnnn_ssss_tttt _wwww_cccc_hhhh_aaaa_rrrr______tttt _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _...._...._...._))))_;;;; _iiii_nnnn_tttt _ssss_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff_((((_wwww_cccc_hhhh_aaaa_rrrr______tttt _****_ssss_,,,, _ssss_iiii_zzzz_eeee______tttt _nnnn_,,,, _cccc_oooo_nnnn_ssss_tttt _wwww_cccc_hhhh_aaaa_rrrr______tttt _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _...._...._...._))))_;;;; DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff places output on the named output _s_t_r_e_a_m. _wwww_pppp_rrrr_iiii_nnnn_tttt_ffff places output on _ssss_tttt_dddd_oooo_uuuu_tttt. _ssss_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff places output, followed by a null wide-character in consecutive wide-characters starting at *_s; no more than _n wide-characters are written, including a terminating null wide-character, which is always added (unless n is zero). Each function returns the number of wide-characters transmitted (not including the terminating null character in the case of _ssss_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff), or a negative value if an output error was encountered. If n or more wide- characters were requested to be written _ssss_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff returns a negative value. Each of these functions converts, formats, and prints its _a_r_g_s under control of the _f_o_r_m_a_t wide-character string. The results are undefined if there are insufficient arguments for the format. If the format is exhausted while arguments remain, the excess arguments are simply ignored. The _f_o_r_m_a_t is a wide-character string that contains two types of objects defined below: 1. ordinary wide-characters, which are simply copied to the output stream; 2. conversion specifications. All forms of the _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff functions allow for the insertion of a language-dependent decimal-point character. The decimal-point character is defined by the program's locale (category _LLLL_CCCC______NNNN_UUUU_MMMM_EEEE_RRRR_IIII_CCCC). In the _""""_CCCC_"""" locale, or in a locale where the decimal-point character is not defined, the decimal-point character defaults to a period (_....). Each conversion specification is introduced by the character _%%%%, and takes the following general form and sequence: PPPPaaaaggggeeee 1111 ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) _%%%%[_p_o_s_p_$$$$][_f_l_a_g_s][_w_i_d_t_h][_...._p_r_e_c_i_s_i_o_n][_s_i_z_e]_f_m_t _p_o_s_p_$$$$ An optional entry, consisting of one or more decimal digits followed by a _$$$$ character, specifying the number of the next _a_r_g to access. The first _a_r_g (just after _f_o_r_m_a_t) is numbered 1. If this field is not specified, the _a_r_g following the most recently used _a_r_g will be used. _f_l_a_g_s Zero or more characters that modify the meaning of the conversion specification. The _f_l_a_g characters and their meanings are: _'''' The integer portion of the result of a decimal conversion (for _iiii, _dddd, _uuuu, _ffff, _gggg, or _GGGG conversions) will be formatted with the thousands' grouping characters. The non-monetary grouping character will be used. _---- The result of the conversion will be left-justified within the field. (It will be right-justified if this flag is not specified.) _++++ The result of a signed conversion will always begin with a sign (+ or -). (It will begin with a sign only when a negative value is converted if this flag is not specified.) _s_p_a_c_e If the first wide-character of a signed conversion is not a sign, or if a signed conversion results in no characters, a space will be prefixed to the result. If the _s_p_a_c_e and + flags both appear, the _s_p_a_c_e flag will be ignored. _#### The value is to be converted to an alternate form. For an _oooo conversion, it increases the precision (if necessary) to force the first digit of the result to be a zero. For _xxxx (or _XXXX) conversion, a nonzero result will have _0000_xxxx (or _0000_XXXX) prefixed to it. For _eeee, _EEEE, _ffff, _gggg, and _GGGG conversions, the result will always contain a decimal-point character, even if no digits follow it. (Normally, a decimal point appears in the result of these conversions only if a digit follows it.) For _gggg and _GGGG conversions, trailing zeros will not be removed from the result (as they normally are). For _cccc, _dddd, _iiii, _ssss, and _uuuu conversions, the flag has no effect. _0000 For _dddd, _iiii, _oooo, _uuuu, _xxxx, _XXXX, _eeee, _EEEE, _ffff, _gggg, and _GGGG conversions, leading zeros (following any indication of sign or base) are used to pad to the field width; no space padding is performed. If the _0000 and _---- flags both appear, the _0000 flag will be ignored. For _dddd, _iiii, _oooo, _uuuu, _xxxx, and _XXXX conversions, if a precision is specified, the _0000 flag will be ignored. If the _0000 and _'''' flags both appear, the grouping wide-characters are inserted before zero padding. For other conversions, the behavior is undefined. PPPPaaaaggggeeee 2222 ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) _w_i_d_t_h An optional entry that consists of either one or more decimal digits, or an asterisk (_****), or an asterisk followed by one or more decimal digits and a _$$$$. It specifies the minimum field width: If the converted value has fewer wide-characters than the field width, it will be padded (with space by default) on the left or right (see the above _f_l_a_g_s description) to the field width. _...._p_r_e_c An optional entry that consists of a period (_....) followed by either zero or more decimal digits, or an asterisk (_****), or an asterisk followed by one or more decimal digits and a _$$$$. It specifies the minimum number of digits to appear for the _dddd, _iiii, _oooo, _uuuu, _xxxx, and _XXXX conversions, the number of digits to appear after the decimal-point character for the _eeee, _EEEE, and _ffff conversions, the maximum number of significant digits for the _gggg and _GGGG conversions, or the maximum number of wide-characters to be written from a string for an _ssss conversion. For other conversions, the behavior is undefined. If only a period is specified, the precision is taken as zero. _s_i_z_e An optional _llll (ell) specifies that a following c conversion wide- character applies to a wint_t argument; an optional _llll (ell) specifies that a following s conversion wide-character applies to a wchar_t argument; an optional _hhhh specifies that a following _dddd_,,,, _iiii, _oooo, _uuuu,_xxxx or _XXXX conversion wide-character applies to a type short int or type unsigned short int argument (the argument will have been promoted according to the integral promotions, and its value will be converted to type short int or unsigned short int before printing); an optional _hhhh specifies that a following _nnnn conversion wide-character applies to a pointer to a type short int argument; an optional _llll (ell) specifies that a following _dddd, _iiii, _oooo, _uuuu, _xxxx or _XXXX conversion wide-character applies to a type long int or unsigned long int argument; an optional _llll (ell) specifies that a following _nnnn conversion wide-character applies to a pointer to a type long int argument; or an optional _LLLL specifies that a following _eeee, _EEEE, _ffff, _gggg or _GGGG conversion wide-character applies to a type long double argument. If an h, l or L appears with any other conversion wide-character, the behaviour is undefined. If a _s_i_z_e appears other than in the following combinations, the behavior is undefined. _f_m_t A conversion wide-character (described below) that indicates the type of conversion to be applied. When a _w_i_d_t_h or _...._p_r_e_c includes an asterisk (_****), an _iiii_nnnn_tttt _a_r_g supplies the width or precision. When they do not include a _$$$$, the arguments specifying a field width, or precision, or both must appear (in that order) before the argument (if any) to be converted. If the conversion specification includes _p_o_s_p_$$$$, the field width and precision may include a _$$$$. The decimal digits that precede the _$$$$ similarly specify the number of the _a_r_g that contains the field width or precision. (In this case, _p_o_s_p_$$$$ specifies the number of the _a_r_g to convert.) A negative field width argument is taken as a _---- flag followed by a positive field width. If the precision argument is negative, it will be taken as zero. PPPPaaaaggggeeee 3333 ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) When numbered argument specifications are used, specifying the _Nth argument requires that all the leading arguments, from the first to the (_N-1)th, be specified at least once, in a consistent manner in the format string. The conversion characters and their meanings are: _dddd, _iiii The integer _a_r_g is converted to signed decimal. The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it will be expanded with leading zeros. The default precision is 1. The result of converting a zero value with a precision of zero is no characters. _oooo, _uuuu, _xxxx, _XXXX The unsigned integer _a_r_g is converted to unsigned octal (_oooo), unsigned decimal (_uuuu), or unsigned hexadecimal notation (_xxxx and _XXXX). The _xxxx conversion uses the letters _aaaa_bbbb_cccc_dddd_eeee_ffff and the _XXXX conversion uses the letters _AAAA_BBBB_CCCC_DDDD_EEEE_FFFF. The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it will be expanded with leading zeros. The default precision is 1. The result of converting a zero value with a precision of zero is no characters. _ffff The floating _a_r_g is converted to decimal notation in the style _[[[[_----_]]]]_d_d_d_...._d_d_d, where the number of digits after the decimal-point character [see _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C)] is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is zero and the _#### flag is not specified, no decimal- point character appears. If a decimal-point character appears, at least one digit appears before it. The value is rounded to the appropriate number of digits. The fwprintf() family of functions may make available wide-character string representations for infinity and NaN. _eeee, _EEEE The double _a_r_g is converted to the style _[[[[_----_]]]]_d_...._d_d_d_eeee+__d_d, where there is one digit before the decimal-point character (which is nonzero if the argument is nonzero) and the number of digits after it is equal to the precision. If the precision is missing, it is taken as 6; if the precision is zero and the _#### flag is not specified, no decimal- point character appears. The value is rounded to the appropriate number of digits. The _EEEE conversion wide-character will produce a number with _EEEE instead of _eeee introducing the exponent. The exponent always contains at least two digits. If the value is zero, the exponent is zero. _gggg, _GGGG The double argument is converted in the style _ffff or _eeee (or in the style _EEEE in the case of a _GGGG conversion wide-character), with the precision specifying the number of significant digits. If an explicit precision is 0, it is taken as 1. The style used depends on the value converted; style _eeee (or _EEEE) will be used only if the exponent resulting from such a conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the PPPPaaaaggggeeee 4444 ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) fractional portion of the result; a radix character appears only if it is followed by a digit. The _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff family of functions may make available wide-character string representations for infinity and NaN. _cccc If no _llll _((((_eeee_llll_llll_)))) qualifier is present, the int argument is converted to a wide-character as if by calling the _bbbb_tttt_oooo_wwww_cccc_((((_)))) function and the resulting wide-character is written. Otherwise the wint_t argument is converted to wchar_t and written. _CCCC _a_r_g is interpreted as a _wwww_cccc_hhhh_aaaa_rrrr______tttt, converted to a multi-byte sequence, and the resulting byte(s) are written. _ssss If no _llll _((((_eeee_llll_llll_)))) qualifier is present, the argument must be a pointer to a character array containing a character sequence beginning in the initial shift state. Characters from the array are converted as if by repeated calls to the _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc_((((_)))) function, with the conversion state described by an mbstate_t object initialised to zero before the first character is converted, and written up to (but not including) the terminating null wide-character. If the precision is specified, no more than that many wide-characters are written. If the precision is not specified or is greater than the size of the array, the array must contain a null wide-character. If an _llll _((((_eeee_llll_llll_)))) qualifier is present, the argument must be a pointer to an array of type wchar_t. Wide characters from the array are written up to (but not including) a terminating null wide-character. If no precision is specified or is greater than the size of the array, the array must contain a null wide-character. If a precision is specified, no more than that many wide-characters are written. (A null pointer for _a_r_g will yield undefined results.) _SSSS The _a_r_g is taken to be a pointer to an array of wide characters (_wwww_cccc_hhhh_aaaa_rrrr______tttt). Each character from the array is converted to a multi- byte sequence and the resulting byte(s) are written. Conversion stops when there is a null wide character in the array. If a precision is specified, no more than that many characters are written. If a precision is not specified or is greater than the size of the array, the array must contain a terminating null character. (A null pointer for _a_r_g will yield undefined results.) _pppp The _a_r_g is taken to be a pointer to _vvvv_oooo_iiii_dddd. The value of the pointer is converted to an implementation-defined sequence of printable characters, which matches those read by the _%%%%_pppp conversion of the _wwww_ssss_cccc_aaaa_nnnn_ffff function. _nnnn The _a_r_g is taken to be a pointer to an integer into which is written the number of characters written so far by this call to _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff, _wwww_pppp_rrrr_iiii_nnnn_tttt_ffff, or _ssss_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff. No argument is converted. _%%%% Print a _%%%%; no argument is converted. The complete specification must be simply _%%%%_%%%%. PPPPaaaaggggeeee 5555 ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) If the form of the conversion specification does not match any of the above, the results of the conversion are undefined. Similarly, the results are undefined if there are insufficient _a_r_g_s for the format. If the format is exhausted while _a_r_g_s remain, the excess _a_r_g_s are ignored. If a floating-point value is the internal representation for infinity, the output is [+_]_i_n_f, where _i_n_f is either _iiii_nnnn_ffff or _IIII_NNNN_FFFF, depending on whether the conversion character is lowercase or uppercase. Printing of the sign follows the rules described above. If a floating-point value is the internal representation for ``not-a- number,'' the output is [+_]_n_a_n_0000_x_m. Depending on the conversion character, _n_a_n is either _nnnn_aaaa_nnnn or _NNNN_AAAA_NNNN. Additionally, _0000_x_m represents the most significant part of the mantissa. Again depending on the conversion character, _x will be _xxxx or _XXXX, and _m will use the letters _aaaa_bbbb_cccc_dddd_eeee_ffff or _AAAA_BBBB_CCCC_DDDD_EEEE_FFFF. Printing of the sign follows the rules described above. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result. Characters generated by _wwww_pppp_rrrr_iiii_nnnn_tttt_ffff and _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff are printed as if the _wwww_pppp_uuuu_tttt_cccc routine had been called repeatedly. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS To print a date and time in the form ``Sunday, July 3, 10:02,'' where _wwww_eeee_eeee_kkkk_dddd_aaaa_yyyy and _mmmm_oooo_nnnn_tttt_hhhh are pointers to null-terminated strings: _wwww_pppp_rrrr_iiii_nnnn_tttt_ffff_((((_LLLL_""""_%%%%_ssss_,,,, _%%%%_ssss _%%%%_dddd_,,,, _%%%%_dddd_::::_%%%%_...._2222_dddd_""""_,,,, _wwww_eeee_eeee_kkkk_dddd_aaaa_yyyy_,,,, _mmmm_oooo_nnnn_tttt_hhhh_,,,, _dddd_aaaa_yyyy_,,,, _hhhh_oooo_uuuu_rrrr_,,,, _mmmm_iiii_nnnn_))))_;;;; To print the language-independent date and time format, the following statement could be used: _wwww_pppp_rrrr_iiii_nnnn_tttt_ffff _((((_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _wwww_eeee_eeee_kkkk_dddd_aaaa_yyyy_,,,, _mmmm_oooo_nnnn_tttt_hhhh_,,,, _dddd_aaaa_yyyy_,,,, _hhhh_oooo_uuuu_rrrr_,,,, _mmmm_iiii_nnnn_))))_;;;; For American usage, format could be a pointer to the wide-character string: _LLLL_""""_%%%%_ssss_,,,, _%%%%_ssss _%%%%_dddd_,,,, _%%%%_dddd_::::_%%%%_...._2222_dddd_"""" producing the message: _SSSS_uuuu_nnnn_dddd_aaaa_yyyy_,,,, _JJJJ_uuuu_llll_yyyy _3333_,,,, _1111_0000_::::_0000_2222 whereas for German usage, format could be a pointer to the wide-character string: _LLLL_""""_%%%%_1111_$$$$_ssss_,,,, _%%%%_3333_$$$$_dddd_.... _%%%%_2222_$$$$_ssss_,,,, _%%%%_4444_$$$$_dddd_::::_%%%%_5555_$$$$_...._2222_dddd_"""" producing the message: PPPPaaaaggggeeee 6666 ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) ffffwwwwpppprrrriiiinnnnttttffff((((3333SSSS)))) _SSSS_oooo_nnnn_nnnn_tttt_aaaa_gggg_,,,, _3333_.... _JJJJ_uuuu_llll_iiii_,,,, _1111_0000_::::_0000_2222 NNNNOOOOTTTTEEEESSSS These functions are supported in n32 and 64 bit C Libraries for IRIX 6.5.17 and later versions. SSSSEEEEEEEE AAAALLLLSSSSOOOO _bbbb_tttt_oooo_wwww_cccc(3S), _ffff_pppp_uuuu_tttt_wwww_cccc(3S), _ffff_wwww_ssss_cccc_aaaa_nnnn_ffff(3S), _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C), _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc(3C), _ssss_tttt_dddd_iiii_oooo(3S). DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff, _wwww_pppp_rrrr_iiii_nnnn_tttt_ffff, and _ssss_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff return the number of wide-characters transmitted (not counting the terminating null character for _ssss_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff), or return a negative value if an error was encountered. If _n or more wide characters were requested to be written _ssss_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff returns a negative value. In addition, all forms of fwprintf() may fail if: [EILSEQ] A wide-character code that does not correspond to a valid character has been detected. [EINVAL] There are insufficient arguments. In addition, wprintf() and fwprintf() may fail if: [ENOMEM] Insufficient storage space is available. PPPPaaaaggggeeee 7777